/*
 * @描述: 路由配置
 * @版权所有: 广东国星科技有限公司
 * @商业授权: www.mscodecloud.com
 */
export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', name: 'login', component: './User/Login' },
      { path: '/user/register', name: 'register', component: './User/Register' },
      { path: '/user/forgotpassword', name: 'forgotpassword', component: './User/ForgotPassword' },
      { path: '/user/register-result', name: 'register.result', component: './User/RegisterResult' },
      { path: '/user/forgotpassword-result', name: 'forgotpassword.result', component: './User/ForgotPasswordResult' },
      { component: '404' }
    ]
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    routes: [
      { path: '/', redirect: '/home/workbench' },
      {
        path: '/home',
        name: 'home',
        routes: [
          {
            path: '/home/workbench',
            name: 'workbench',
            component: './Home/Workbench'
          },
          {
            path: '/home/mynotification',
            name: 'mynotification',
            component: './Home/MyNotification'
          }
        ]
      },
      {
        path: '/authority',
        name: 'authority',
        routes: [
          {
            path: '/authority/sysrole',
            name: 'sysrole',
            component: './Admin/SysRole'
          },
          {
            path: '/authority/datapermission',
            name: 'datapermission',
            component: './Admin/DataPermission'
          }
        ]
      },
      {
        path: '/admin',
        name: 'admin',
        routes: [
          {
            path: '/admin/sysuser',
            name: 'sysuser',
            component: './Admin/SysUser'
          },
          {
            path: '/admin/sysmenu',
            name: 'sysmenu',
            component: './Admin/SysMenu'
          },
          {
            path: '/admin/sysorg',
            name: 'sysorg',
            component: './Admin/SysOrg'
          },
          {
            path: '/admin/sysdict',
            name: 'sysdict',
            component: './Admin/SysDict'
          },
          {
            path: '/admin/sysregion',
            name: 'sysregion',
            component: './Admin/SysRegion'
          },
          {
            path: '/admin/sysparam',
            name: 'sysparam',
            component: './Admin/SysParam'
          },
          {
            path: '/admin/notification',
            name: 'notification',
            component: './Admin/Notification'
          }
        ]
      },
      {
        path: '/file',
        name: 'file',
        routes: [
          {
            path: '/file/upload-download',
            name: 'uploaddownload',
            component: './File/File'
          }
        ]
      },
      {
        path: '/distributedlog',
        name: 'distributedlog',
        routes: [
          {
            name: 'kibana'
          }
        ]
      },
      {
        path: '/monitors',
        name: 'monitors',
        routes: [
          {
            name: 'sentinel'
          },
          {
            name: 'nacos'
          },
          {
            name: 'swagger'
          },
          {
            name: 'druid'
          }
        ]
      },
      {
        path: '/account',
        name: 'account',
        routes: [
          {
            path: '/account/settings',
            name: 'settings',
            component: './Account/Settings/Info',
            routes: [
              {
                path: '/account/settings',
                redirect: '/account/settings/base'
              },
              {
                path: '/account/settings/base',
                component: './Account/Settings/BaseView'
              },
              {
                path: '/account/settings/security',
                component: './Account/Settings/SecurityView'
              },
              {
                path: '/account/settings/notification',
                component: './Account/Settings/NotificationView'
              }
            ]
          }
        ]
      },
      {
        path: '/exception',
        name: 'exception',
        routes: [
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/Exception403'
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/Exception404'
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/Exception500'
          }
        ]
      },
      {
        path: '/template',
        name: 'template',
        routes: [
          {
            path: '/template/form',
            name: 'form',
            routes: [
              {
                path: '/template/form/basic-form',
                name: 'basicform',
                component: './Template/Forms/BasicForm'
              },
              {
                path: '/template/form/step-form',
                name: 'stepform',
                component: './Template/Forms/StepForm',
                routes: [
                  {
                    path: '/template/form/step-form?current=1',
                    component: './Template/Forms/StepForm/Step1',
                  },
                  {
                    path: '/template/form/step-form/info',
                    name: 'info',
                    component: './Template/Forms/StepForm/Step1'
                  },
                  {
                    path: '/template/form/step-form/confirm',
                    name: 'confirm',
                    component: './Template/Forms/StepForm/Step2'
                  },
                  {
                    path: '/template/form/step-form/finish',
                    name: 'finish',
                    component: './Template/Forms/StepForm/Step3'
                  }
                ]
              },
              {
                path: '/template/form/advanced-form',
                name: 'advancedform',
                component: './Template/Forms/AdvancedForm'
              }
            ]
          },
          {
            path: '/template/list',
            name: 'list',
            routes: [
              {
                path: '/template/list/table-list',
                name: 'searchtable',
                component: './Template/List/TableList'
              },
              {
                path: '/template/list/basic-list',
                name: 'basiclist',
                component: './Template/List/BasicList'
              },
              {
                path: '/template/list/card-list',
                name: 'cardlist',
                component: './Template/List/CardList'
              },
              {
                path: '/template/list/search',
                name: 'searchlist',
                component: './Template/List/List',
                routes: [
                  {
                    path: '/template/list/search',
                    redirect: '/template/list/search/articles'
                  },
                  {
                    path: '/template/list/search/articles',
                    name: 'articles',
                    component: './Template/List/Articles'
                  },
                  {
                    path: '/template/list/search/projects',
                    name: 'projects',
                    component: './Template/List/Projects'
                  },
                  {
                    path: '/template/list/search/applications',
                    name: 'applications',
                    component: './Template/List/Applications'
                  }
                ]
              }
            ]
          },
          {
            path: '/template/profile',
            name: 'profile',
            routes: [
              {
                path: '/template/profile/basic',
                name: 'basic',
                component: './Template/Profile/BasicProfile'
              },
              {
                path: '/template/profile/basic/:id',
                component: './Template/Profile/BasicProfile'
              },
              {
                path: '/template/profile/advanced',
                name: 'advanced',
                component: './Template/Profile/AdvancedProfile'
              }
            ]
          },
          {
            path: '/template/result',
            name: 'result',
            routes: [
              {
                path: '/template/result/success',
                name: 'success',
                component: './Template/Result/Success'
              },
              {
                path: '/template/result/fail',
                name: 'fail',
                component: './Template/Result/Error'
              }
            ]
          },
          {
            path: '/template/account',
            name: 'account',
            routes: [
              {
                path: '/template/account/center',
                name: 'center',
                component: './Template/Account/Center/Center',
                routes: [
                  {
                    path: '/template/account/center',
                    redirect: '/template/account/center/articles'
                  },
                  {
                    path: '/template/account/center/articles',
                    component: './Template/Account/Center/Articles'
                  },
                  {
                    path: '/template/account/center/applications',
                    component: './Template/Account/Center/Applications'
                  },
                  {
                    path: '/template/account/center/projects',
                    component: './Template/Account/Center/Projects'
                  }
                ]
              }
            ]
          },
          {
            path: '/template/editor',
            name: 'editor',
            routes: [
              {
                path: '/template/editor/flow',
                name: 'flow',
                component: './Template/Editor/GGEditor/Flow'
              },
              {
                path: '/template/editor/mind',
                name: 'mind',
                component: './Template/Editor/GGEditor/Mind'
              },
              {
                path: '/template/editor/koni',
                name: 'koni',
                component: './Template/Editor/GGEditor/Koni'
              }
            ]
          }
        ]
      },
      {
        component: '404'
      }
    ]
  }
];
